1. Field of the Invention
The invention relates to a downstream cycle/out transaction for a universal serial bus (USB) host controller with 3.0 protocol, and more particularly to a USB host controller with 3.0 protocol and a control method thereof, which can reduce the frequency of accessing a system memory, thereby enhancing the performance of the USB host controller.
2. Description of the Related Art
A universal serial bus (USB) 3.0 protocol has already been established. In the USB 3.0 protocol, an NRDY (unready, or not ready)/ERDY (endpoint ready) mechanism is defined. In particular, a USB host controller is coupled to an external system memory and communicates with at least one USB device. Each USB device comprises one or more endpoints. When the USB host controller sends a request (such as an input (IN) request or an output (OUT) request) to the one or more endpoints, if the endpoint is not ready to send/receive the requested data, the endpoint sends an NRDY response to the USB host controller. When the endpoint is ready to send/receive the requested data, the endpoint sends an ERDY request to the USB host controller, so that the USB host controller re-performs the corresponding transaction which was not previously performed due to the NRDY response.
Traditionally, during the processing operation of the output transaction, a buffer unit in an internal buffer of the USB host controller is assigned to read output data from a system memory, and the output data is written into the assigned buffer unit. Then the USB host controller sends the output data to an endpoint. If the USB host controller receives an NRDY response from the endpoint, the USB host controller releases the assigned buffer unit, so that the stored output data is deleted. Then, when the USB host controller receives an ERDY request from the endpoint, the USB host controller assigns a buffer unit in the buffer again to read output data from the system memory. The output data is stored in the assigned buffer unit temporarily and then sent to the endpoint. Finally, the USB host controller once again releases the assigned buffer unit.
According to the above description, once the USB host controller receives an NRDY response from an endpoint, the USB host controller releases the buffer unit that stores the output data. Then, when the USB host controller receives an ERDY request, output data is requested to be read from the external system memory. Accordingly, the time for the USB host controller to respond to the ERDY request is extended, and the frequency of accessing the system memory is increased, which reduces the performance of the USB host controller.
Thus, it is desired to provide a USB host controller and a control method therefore which can reduce the time for the USB host controller to respond to the ERDY request and reduce the frequency of accessing a system memory, which improves the performance of the USB host controller.